package com.itheima.d1_RunTimeException;

public class ExceptionDemo {
    public static void main(String[] args) {
        //1 数组越界
        System.out.println("程序开始");
        int[] arr = {1,2,4};
       // System.out.println(arr[3]);
        //2 空指针异常；
        String name = null;
      //  System.out.println(name.length());

        //3. 类型转换异常
        Object o  = 23;
     //   String s = (String) o;

        //4 数学操作异常
      //  System.out.println(10/0);

        // 5 数字转换异常
        String number = "23a";
        int i = Integer.parseInt(number);

        System.out.println("程序结束");



    }
}
